package com.micro.modual.extension;

import com.micro.common.MicroConstant;
import com.micro.common.biz.GeneratorCodeUtil;
import com.micro.common.util.SnowFlakeUtil;
import com.micro.modual.entity.UserBrowseRecord;
import com.micro.modual.model.bo.userbrowserecord.UserBrowseRecordBO;

/**
 * <h1>用户浏览记录表 延展类</h1>
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2020-08-04 00:23:26
 */
public class UserBrowseRecordExtension {

    /**
     * <h2>转换: 用户浏览记录表 新增</h2>
     * @param userBrowseRecordBO {@link UserBrowseRecordBO} 用户浏览记录表 新增/修改 请求对象
     * @return {@link UserBrowseRecord} 用户浏览记录表
     */
    public static UserBrowseRecord converAddUserBrowseRecord(UserBrowseRecordBO userBrowseRecordBO) {
        UserBrowseRecord userBrowseRecord = new UserBrowseRecord();
        userBrowseRecord.setId(SnowFlakeUtil.getId());
                                                            userBrowseRecord.setUserCode(userBrowseRecordBO.getUserCode());
                                                    userBrowseRecord.setCreateTime(userBrowseRecordBO.getCreateTime());
                                                    userBrowseRecord.setBrowseType(userBrowseRecordBO.getBrowseType());
                                                    userBrowseRecord.setBrowseImage(userBrowseRecordBO.getBrowseImage());
                                                    userBrowseRecord.setBrowseName(userBrowseRecordBO.getBrowseName());
                                                    userBrowseRecord.setGoodsPrice(userBrowseRecordBO.getGoodsPrice());
                                                    userBrowseRecord.setBrowseStatus(userBrowseRecordBO.getBrowseStatus());
                                                    userBrowseRecord.setGoodsCode(userBrowseRecordBO.getGoodsCode());
                                                    userBrowseRecord.setLinkUrl(userBrowseRecordBO.getLinkUrl());
                            return userBrowseRecord;
    }

    /**
     * <h2>转换: 用户浏览记录表 修改</h2>
     * @param userBrowseRecordBO {@link UserBrowseRecordBO} 用户浏览记录表 新增/修改 请求对象
     * @return {@link UserBrowseRecord} 用户浏览记录表
     */
    public static UserBrowseRecord converEditUserBrowseRecord(UserBrowseRecordBO userBrowseRecordBO) {
        UserBrowseRecord userBrowseRecord = new UserBrowseRecord();
        userBrowseRecord.setId(userBrowseRecordBO.getId());
                                                        userBrowseRecord.setUserCode(userBrowseRecordBO.getUserCode());
                                                userBrowseRecord.setCreateTime(userBrowseRecordBO.getCreateTime());
                                                userBrowseRecord.setBrowseType(userBrowseRecordBO.getBrowseType());
                                                userBrowseRecord.setBrowseImage(userBrowseRecordBO.getBrowseImage());
                                                userBrowseRecord.setBrowseName(userBrowseRecordBO.getBrowseName());
                                                userBrowseRecord.setGoodsPrice(userBrowseRecordBO.getGoodsPrice());
                                                userBrowseRecord.setBrowseStatus(userBrowseRecordBO.getBrowseStatus());
                                                userBrowseRecord.setGoodsCode(userBrowseRecordBO.getGoodsCode());
                                                userBrowseRecord.setLinkUrl(userBrowseRecordBO.getLinkUrl());
                            return userBrowseRecord;
    }
}
